<?php
/*
Plugin Name: WP Iello Mootools Plugin
Plugin URI: http://www.iello.ro
Description: Plugin for integration of Mootools stuff (like multibox, slideshow, etc).
Version: 1.0
Author: Iello-Dev
Author URI: http://www.iello.ro
*/

/* Definitions */
if (! defined('MBX_PLUGIN_URL'))
    define('MBX_PLUGIN_URL', WP_PLUGIN_URL . '/' . plugin_basename(dirname(__FILE__)));
/* ----------------------------------------------------------------------------------------- */	
/* Necessary js includes */
wp_enqueue_script('mootools', MBX_PLUGIN_URL . '/js/mootools.js', array());
wp_enqueue_script('mootoolsmore', MBX_PLUGIN_URL . '/js/mootools.more.js', array('mootools'));
wp_enqueue_script('multibox', MBX_PLUGIN_URL . '/js/multibox.js', array('mootools'));
wp_enqueue_script('overlay', MBX_PLUGIN_URL . '/js/overlay.js', array('mootools','multibox'));
wp_enqueue_script('morphlist', MBX_PLUGIN_URL . '/js/morphlist.js', array('mootools'));
wp_enqueue_script('slideshow', MBX_PLUGIN_URL . '/js/slideshow.js', array('mootools','morphlist'));
wp_enqueue_script('dropdown', MBX_PLUGIN_URL . '/js/dropdown.js', array('mootools'));
wp_enqueue_script('mootabs', MBX_PLUGIN_URL . '/js/mootabs.js', array('mootools'));
wp_enqueue_script('newsticker', MBX_PLUGIN_URL . '/js/newsticker.js', array('mootools'));
wp_enqueue_script('formcheck-lang', MBX_PLUGIN_URL . '/js/formcheck.ro.js', array('mootools'));
wp_enqueue_script('formcheck', MBX_PLUGIN_URL . '/js/formcheck.js', array('mootools','formcheck-lang'));
wp_enqueue_script('main', MBX_PLUGIN_URL . '/js/main.js', array('mootools','multibox'));
/* ----------------------------------------------------------------------------------------- */
	
class wp_mootools {
	function wp_mootools(){
		add_action('wp_head', array(&$this, 'wp_head'));
	}
	function wp_head() {
		$multiboxstyle	= MBX_PLUGIN_URL . '/css/multibox.css';
		$dropdown		= MBX_PLUGIN_URL . '/css/dropdown.css';
		$mootabs		= MBX_PLUGIN_URL . '/css/mootabs.css';
		$formcheck		= MBX_PLUGIN_URL . '/css/formcheck.css';
		$pngfix			= MBX_PLUGIN_URL . '/css/iepngfix.htc';		
		$transparent	= MBX_PLUGIN_URL . '/img/transparent.gif';
		$tilebgpng 		= MBX_PLUGIN_URL . '/js/iepngfix_tilebg.js';	
?>				
		<!-- wordpress mootools stuff plugin by IELLO-DEV [http://www.iello.ro]  -->
		<link rel="stylesheet" href="<?php echo $multiboxstyle ?>" type="text/css" />
		<link rel="stylesheet" href="<?php echo $dropdown ?>" type="text/css" />
		<link rel="stylesheet" href="<?php echo $mootabs ?>" type="text/css" />
		<link rel="stylesheet" href="<?php echo $formcheck ?>" type="text/css" />

		<!--[if IE 6]>
		<script type='text/javascript' src='<?php echo $tilebgpng ?>'></script>
		<script type='text/javascript'>
			var IEPNGFix = window.IEPNGFix || {};
			IEPNGFix.data = IEPNGFix.data || {};
			IEPNGFix.blankImg = '<?php echo $transparent ?>';
		</script>
		<style type="text/css" media="screen">
			.MultiBoxClose, .MultiBoxPrevious, .MultiBoxNext, .MultiBoxNextDisabled, .MultiBoxPreviousDisabled { 
				behavior:url(<?php echo $pngfix?>);
			}
		</style>	
		<![endif]-->					
<?php	
	}	
}		
$multibox = new wp_mootools();	
?>